using System;
using System.Collections.Generic;
using System.Reflection;
using System.Runtime.InteropServices;

using ILRuntime.CLR.TypeSystem;
using ILRuntime.CLR.Method;
using ILRuntime.Runtime.Enviorment;
using ILRuntime.Runtime.Intepreter;
using ILRuntime.Runtime.Stack;
using ILRuntime.Reflection;
using ILRuntime.CLR.Utils;
using System.Linq;

namespace ILRuntime.Runtime.Generated
{
    unsafe class huqiang_Core_HGUI_UIType_Binding
    {
        public static void Register(ILRuntime.Runtime.Enviorment.AppDomain app)
        {
            BindingFlags flag = BindingFlags.Public | BindingFlags.Instance | BindingFlags.Static | BindingFlags.DeclaredOnly;
            MethodBase method;
            FieldInfo field;
            Type[] args;
            Type type = typeof(huqiang.Core.HGUI.UIType);

            field = type.GetField("UIElement", flag);
            app.RegisterCLRFieldGetter(field, get_UIElement_0);
            app.RegisterCLRFieldBinding(field, CopyToStack_UIElement_0, null);
            field = type.GetField("HCanvas", flag);
            app.RegisterCLRFieldGetter(field, get_HCanvas_1);
            app.RegisterCLRFieldBinding(field, CopyToStack_HCanvas_1, null);
            field = type.GetField("HGraphics", flag);
            app.RegisterCLRFieldGetter(field, get_HGraphics_2);
            app.RegisterCLRFieldBinding(field, CopyToStack_HGraphics_2, null);
            field = type.GetField("HImage", flag);
            app.RegisterCLRFieldGetter(field, get_HImage_3);
            app.RegisterCLRFieldBinding(field, CopyToStack_HImage_3, null);
            field = type.GetField("HText", flag);
            app.RegisterCLRFieldGetter(field, get_HText_4);
            app.RegisterCLRFieldBinding(field, CopyToStack_HText_4, null);
            field = type.GetField("TextBox", flag);
            app.RegisterCLRFieldGetter(field, get_TextBox_5);
            app.RegisterCLRFieldBinding(field, CopyToStack_TextBox_5, null);
            field = type.GetField("HLine", flag);
            app.RegisterCLRFieldGetter(field, get_HLine_6);
            app.RegisterCLRFieldBinding(field, CopyToStack_HLine_6, null);


            app.RegisterCLRCreateDefaultInstance(type, () => new huqiang.Core.HGUI.UIType());
            app.RegisterCLRCreateArrayInstance(type, s => new huqiang.Core.HGUI.UIType[s]);

            args = new Type[]{};
            method = type.GetConstructor(flag, null, args, null);
            app.RegisterCLRMethodRedirection(method, Ctor_0);

        }



        static object get_UIElement_0(ref object o)
        {
            return huqiang.Core.HGUI.UIType.UIElement;
        }

        static StackObject* CopyToStack_UIElement_0(ref object o, ILIntepreter __intp, StackObject* __ret, IList<object> __mStack)
        {
            var result_of_this_method = huqiang.Core.HGUI.UIType.UIElement;
            return ILIntepreter.PushObject(__ret, __mStack, result_of_this_method);
        }

        static object get_HCanvas_1(ref object o)
        {
            return huqiang.Core.HGUI.UIType.HCanvas;
        }

        static StackObject* CopyToStack_HCanvas_1(ref object o, ILIntepreter __intp, StackObject* __ret, IList<object> __mStack)
        {
            var result_of_this_method = huqiang.Core.HGUI.UIType.HCanvas;
            return ILIntepreter.PushObject(__ret, __mStack, result_of_this_method);
        }

        static object get_HGraphics_2(ref object o)
        {
            return huqiang.Core.HGUI.UIType.HGraphics;
        }

        static StackObject* CopyToStack_HGraphics_2(ref object o, ILIntepreter __intp, StackObject* __ret, IList<object> __mStack)
        {
            var result_of_this_method = huqiang.Core.HGUI.UIType.HGraphics;
            return ILIntepreter.PushObject(__ret, __mStack, result_of_this_method);
        }

        static object get_HImage_3(ref object o)
        {
            return huqiang.Core.HGUI.UIType.HImage;
        }

        static StackObject* CopyToStack_HImage_3(ref object o, ILIntepreter __intp, StackObject* __ret, IList<object> __mStack)
        {
            var result_of_this_method = huqiang.Core.HGUI.UIType.HImage;
            return ILIntepreter.PushObject(__ret, __mStack, result_of_this_method);
        }

        static object get_HText_4(ref object o)
        {
            return huqiang.Core.HGUI.UIType.HText;
        }

        static StackObject* CopyToStack_HText_4(ref object o, ILIntepreter __intp, StackObject* __ret, IList<object> __mStack)
        {
            var result_of_this_method = huqiang.Core.HGUI.UIType.HText;
            return ILIntepreter.PushObject(__ret, __mStack, result_of_this_method);
        }

        static object get_TextBox_5(ref object o)
        {
            return huqiang.Core.HGUI.UIType.TextBox;
        }

        static StackObject* CopyToStack_TextBox_5(ref object o, ILIntepreter __intp, StackObject* __ret, IList<object> __mStack)
        {
            var result_of_this_method = huqiang.Core.HGUI.UIType.TextBox;
            return ILIntepreter.PushObject(__ret, __mStack, result_of_this_method);
        }

        static object get_HLine_6(ref object o)
        {
            return huqiang.Core.HGUI.UIType.HLine;
        }

        static StackObject* CopyToStack_HLine_6(ref object o, ILIntepreter __intp, StackObject* __ret, IList<object> __mStack)
        {
            var result_of_this_method = huqiang.Core.HGUI.UIType.HLine;
            return ILIntepreter.PushObject(__ret, __mStack, result_of_this_method);
        }



        static StackObject* Ctor_0(ILIntepreter __intp, StackObject* __esp, IList<object> __mStack, CLRMethod __method, bool isNewObj)
        {
            ILRuntime.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain;
            StackObject* __ret = ILIntepreter.Minus(__esp, 0);

            var result_of_this_method = new huqiang.Core.HGUI.UIType();

            return ILIntepreter.PushObject(__ret, __mStack, result_of_this_method);
        }


    }
}
